import Vue from 'vue'
//导入app组件
import App from './App.vue'

//导入路由
import VueRouter from 'vue-router'
//vue安装路由
Vue.use(VueRouter)
//导入自己定义的路由模块
import router from './router.js'

//引入mint-ui插件
import Mint from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.use(Mint)

//导入mui插件
import './lib/mui/css/mui.css'
import './lib/mui/css/icons-extra.css'

//按需导入mint-ui
// import { Button, Header } from 'mint-ui'
// Vue.component(Button.name, Button)
// Vue.component(Header.name, Header)


//导入vue-resource
import Resource from 'vue-resource'
//在vue中安装上
Vue.use(Resource)

//导入vue-preview插件
import VuePreview from 'vue-preview'
// defalut install
Vue.use(VuePreview)


//导入css文件
import './index.css'

//导入swiper轮播插件
import Swiper from 'swiper'
import 'swiper/dist/css/swiper.min.css'
//导入时间格式化插件
import moment from 'moment'
//定义全局的过滤器
Vue.filter('dateFormat', function (dateStr, patterm = "YYYY-MM-DD") {
    return moment(dateStr).format(patterm)
})
//vue实例化
var vm = new Vue({
    el: "#app",
    data: {
        msg: "我会数据"
    },
    render: c => c(App), //render渲染会将原来的el的元素给覆盖掉 所以 组件都放到App.vue中渲染
    router
})